package cn.bugstack.service;

import cn.bugstack.domain.req.ShopCartReq;
import cn.bugstack.domain.res.PayOrderRes;
import com.alipay.api.AlipayApiException;

import java.util.List;

/**
 * @Author: 小新
 * @Date: 2025/3/18 18:51
 * @Description: 订单服务
 * @Version: v1.0
 */
public interface IOrderService {

    /**
     * 创建订单
     * @param shopCartReq
     * @return
     */
    PayOrderRes createOrder(ShopCartReq shopCartReq) throws AlipayApiException;

    /**
     * 更改支付成功的状态
     * @param orderId
     */
    void changeOrderPyaSuccess(String orderId);

    /**
     * 查询
     * @return
     */
    List<String> queryNoPayNotifyOrder();

    /**
     * 查询需要关单的列表
     * @return
     */
    List<String> queryTimeoutClosedOrderList();

    /**
     * 关单
     * @param orderId
     * @return
     */
    boolean changeOrderClose(String orderId);
}
